//
//  PersonArrayController.m
//  Annuaire
//
//  Created by Fab on 03/12/2011.
//  Copyright 2011 optimalConcept. All rights reserved.
//

#import "PersonArrayController.h"


@implementation PersonArrayController


- (void) awakeFromNib
{
    NSLog(@"PersonArrayController awakeFromNib:");
    
    NSMutableArray * newPersons = [NSMutableArray arrayWithCapacity: 3];
    
    Person * person= nil;
    
    person = [[Person alloc] init];
    person.firstName = @"Paul";
    person.lastName = @"Bonhomme";
    person.email = @"paul@gmail.com";
    
    [newPersons addObject: person];
    [person autorelease];
    
    person = [[Person alloc] init];
    person.firstName = @"Pierre";
    person.lastName = @"Marchefeu";
    person.email = @"pierre@gmail.com";
    
    [newPersons addObject: person];
    [person autorelease];
    
    person = [[Person alloc] init];
    person.firstName = @"Jean";
    person.lastName = @"Silvestre";
    person.email = @"jean@gmail.com";
    
    [newPersons addObject: person];
    [person autorelease];

    [self addObjects: newPersons];

    NSLog(@"%@", [self content]);
}


@end
